!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("mobx"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","mobx","react","react-dom"],r):r((e=e||self).mobxReactLite={},e.mobx,e.React,e.ReactDOM)}(this,(function(e,r,t,n){"use strict";var o="default"in t?t.default:t;if(!t.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!r.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function i(e){e()}function u(e){e||(e=i),r.configure({reactionScheduler:e})}function a(e){return r.getDependencyTree(e)}var c="undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry;function f(e){return{reaction:e,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+s}}var s=1e4;function d(e){var r=new Map,t=1,n=new e((function(e){var t=r.get(e);t&&(t.reaction.dispose(),r.delete(e))}));return{addReactionToTrack:function(e,o,i){var u=t++;return n.register(i,u,e),e.current=f(o),e.current.finalizationRegistryCleanupToken=u,r.set(u,e.current),e.current},recordReactionAsCommitted:function(e){n.unregister(e),e.current&&e.current.finalizationRegistryCleanupToken&&r.delete(e.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}function l(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function m(){var e,r=new Set;function t(){void 0===e&&(e=setTimeout(n,1e4))}function n(){e=void 0;var n=Date.now();r.forEach((function(e){var t=e.current;t&&n>=t.cleanAt&&(t.reaction.dispose(),e.current=null,r.delete(e))})),r.size>0&&t()}return{addReactionToTrack:function(e,n,o){return e.current=f(n),r.add(e),t(),e.current},recordReactionAsCommitted:function(e){r.delete(e)},forceCleanupTimerToRunNowForTests:function(){e&&(clearTimeout(e),n())},resetCleanupScheduleForTests:function(){if(r.size>0){for(var t,n=function(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,r){if(e){if("string"==typeof e)return l(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(e,void 0):void 0}}(e))){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r);!(t=n()).done;){var o=t.value,i=o.current;i&&(i.reaction.dispose(),o.current=null)}r.clear()}e&&(clearTimeout(e),e=void 0)}}}var p=c?d(c):m(),v=p.addReactionToTrack,b=p.recordReactionAsCommitted,y=p.resetCleanupScheduleForTests,h=!1;function w(e){h=e}function g(){return h}function R(e){return"observer"+e}var T=function(){};function S(){return new T}function x(e,t){if(void 0===t&&(t="observed"),g())return e();var n=o.useState(S)[0],i=o.useState()[1],u=function(){return i([])},c=o.useRef(null);if(!c.current)var f=new r.Reaction(R(t),(function(){s.mounted?u():s.changedBeforeMount=!0})),s=v(c,f,n);var d,l,m=c.current.reaction;if(o.useDebugValue(m,a),o.useEffect((function(){return b(c),c.current?(c.current.mounted=!0,c.current.changedBeforeMount&&(c.current.changedBeforeMount=!1,u())):(c.current={reaction:new r.Reaction(R(t),(function(){u()})),mounted:!0,changedBeforeMount:!1,cleanAt:Infinity},u()),function(){c.current.reaction.dispose(),c.current=null}}),[]),m.track((function(){try{d=e()}catch(e){l=e}})),l)throw l;return d}var O="function"==typeof Symbol&&Symbol.for,A=O?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,C=O?Symbol.for("react.memo"):"function"==typeof t.memo&&t.memo((function(e){return null})).$$typeof,$={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function k(e){var r=e.children||e.render;return"function"!=typeof r?null:x(r)}function j(e){var n=t.useState((function(){return r.observable(e,{},{deep:!1})}))[0];return r.runInAction((function(){Object.assign(n,e)})),n}k.displayName="Observer",u(n.unstable_batchedUpdates),e.Observer=k,e.clearTimers=y,e.enableStaticRendering=w,e.isObserverBatched=function(){return!0},e.isUsingStaticRendering=g,e.observer=function(e,r){var n;if(C&&e.$$typeof===C)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(g())return e;var o=null!=(n=null==r?void 0:r.forwardRef)&&n,i=e,u=e.displayName||e.name;if(A&&e.$$typeof===A&&(o=!0,"function"!=typeof(i=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a,c,f=function(e,r){return x((function(){return i(e,r)}),u)};return""!==u&&(f.displayName=u),e.contextTypes&&(f.contextTypes=e.contextTypes),o&&(f=t.forwardRef(f)),f=t.memo(f),a=e,c=f,Object.keys(a).forEach((function(e){$[e]||Object.defineProperty(c,e,Object.getOwnPropertyDescriptor(a,e))})),f},e.observerBatching=u,e.useAsObservableSource=j,e.useLocalObservable=function(e,n){return t.useState((function(){return r.observable(e(),n,{autoBind:!0})}))[0]},e.useLocalStore=function(e,n){var o=n&&j(n);return t.useState((function(){return r.observable(e(o),void 0,{autoBind:!0})}))[0]},e.useObserver=function(e,r){return void 0===r&&(r="observed"),x(e,r)},e.useStaticRendering=function(e){w(e)},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=mobxreactlite.umd.production.min.js.map
